Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

node-consumer-pact-validation

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-consumer-pact-validation

A consumer pact generator written for pure nodeJS

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

Pact consumer verification

This is a spike at the verification portion of the [version 2 Pact] (https://github.com/pact-foundation/pact-specification/tree/version-2) specification.

The library should work with standard testing frameworks such as mocha and should behave as a standard assertion library. It should throw an AssertionError in the event of failure.

Status:

This library is still in alpha/early stages of development and does not yet fully conform to the v2 specification. At the time of time of writing, the intention is to implement this once it is clearer how to do so.

** Implemented **

  • All PactV1 features (strict body matching, headers, path, method query string etc)
  • Basic v2 Type matching
  • v2 Regex matching tests passing
  • v2 Min/Max matching rules passing

** Not implemented **

  • Nested array type matching still failing (expect unit-test failure)
Usage:

Essentially this the verification section only, use it in place of chai.expect/assert. It's unlikely this will be what you are looking for with standard pact verification. To verify a standard consumer, use it with the interceptor to catch the outgoing http requests and assert they meet the pact spec.

Keywords

FAQs

Package last updated on 22 Jan 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc